﻿<%@ Page Language="C#" Inherits="E.Web.Teacher.internals.publics.classes.List" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>班级列表</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/Common.js"></script>
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <style type="text/css">
    .d_r_i{ float:left; width:100px; }	/*ID*/
    .d_r_cd{ float:left; width:150px; }	/*班级编号*/
    .d_r_e{ float:left; width:150px; }	/*课程*/
    .d_r_c{ float:left; width:150px; }	/*项目名称*/
    .d_r_o{ float:left; width:100px; }	/*操作*/
  </style>
</head>
<body>
  <form id="form1" action="?act=s" method="post">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;搜索条件</div>
      </div>
      <div class="spe_line_2"></div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">班级编号：</div>
        <div class="fl"><input type="text" id="ClassCodeTxt" name="ClassCodeTxt" value="<%=classCode %>" /></div>
        <div class="fl" style="line-height:23px;">&nbsp;项目名称：</div>
        <div class="fl">
          <select id="ProjectSlt" name="ProjectSlt">
            <% if (authority == E.Enum.EnumTeacherAuthority.Admin) { %>            
            <option value="-1">请选择</option>
            <% } %>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in projectList) { %>
            <option value="<%=kvp.Key %>"><%=kvp.Value %></option>
            <% } %>
          </select>
        </div>
        <div class="fl" style="line-height:23px;">&nbsp;课程名称：</div>
        <div class="fl">
          <select id="CourseSlt" name="CourseSlt">          
            <option value="-1">请选择</option>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in courseList) { %>
            <option value="<%=kvp.Key %>"><%=kvp.Value %></option>
            <% } %>
          </select>
        </div>
        <div class="fl"><input type="image" src="/images/btn/search.gif" style="width:54px; height:23px; margin-left:20px;" /></div>
        <div class="fl">&nbsp;&nbsp;<a href="/internals/publics/classes/Edit.aspx?act=n"><img alt="" src="/images/btn/add_2.gif" /></a></div>
      </div>
    </div>
    
    <div class="block_2" style="height:340px; display:table;">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;搜索结果</div>
      </div>
      <div class="spe_line_2"></div>
      
      <% if (classList != null && classList.Count > 0) { %>
    
      <div id="datatable">
        <div class="data_rows" style="font-weight:bolder;">
          <div class="d_r_i">ID</div>
          <div class="d_r_cd">班级编号</div>
          <div class="d_r_e">课程</div>
          <div class="d_r_c">项目组</div>
          <div class="d_r_o">操作</div>
        </div>
        
         <% foreach (InternalPublicClassModel model in classList) { %>
        <div class="data_rows">
          <div class="d_r_i"><%=model.ID%></div>
          <div class="d_r_cd"><%=model.ClassCode%></div>
          <div class="d_r_e"><%=model.CourseName%></div>
          <div class="d_r_c"><%=model.ProjectName%></div>
          <div class="d_r_o"><a href="/internals/publics/classes/View.aspx?id=<%=model.ID %>">查看</a></div>
        </div>
      
         <% } %>
        
      </div>
      
      <div class="fr" style="margin:8px 0 0 0;"><%=mypager%></div>
      
      <%} %>
    </div>
  </form>
  <% if (act == "s") { %>
  <script type="text/javascript">
    document.getElementById("ProjectSlt").value = "<%=projectid %>";
    document.getElementById("CourseSlt").value = "<%=courseid %>";
  </script>
  <% } %>
</body>
</html>
